package org.testis.testdriver;

import org.testis.testdriver.AtofEnumaration.AtofLogLevel;
import org.testis.testdriver.exceptions.TestAbortException;
import org.testis.testdriver.validation.CriticalPostCaseException;


/**
 * A concrete Visitee class that is used to execute the Visitor TestPart class in
 * Runner mode
 * 
 * @author barisergun
 */
public class Runner extends ExecutionInterface {

    public Runner(TestPart testPart) {
        TestStepGlobalDataHashMap.createInstance().clearAllKeyValues();
        mTestPart = testPart;
    }

    public void execute() throws InterruptedException {

        NotificationSubjectSingleton.getInstance().notifyLogMessages(this.getClass().getName(),
                AtofLogLevel.INFO,
                "Debugging Mode :" +
                AtofEnumaration.DebuggingMode.NormalRun,
                mTestPart.getPartGuid());

        boolean testSuiteResult = false;
        try {
            mTestPart.run(AtofEnumaration.DebuggingMode.NormalRun);
        } catch (CriticalPostCaseException eee) {
        } catch (TestAbortException eee) {
            
        }

    }
}

